package String;
//此类使用于判断当前字符串是否指定字符串开头/是否指定字符串结尾





public class StartsWithEndsWithDemo {
    public static void main(String[] args) {
        String str1 = "www.tedu.cn";
        boolean start = str1.startsWith("www");     //判断str1是否为www开头
        System.out.println(start);  //true

        boolean end = str1.endsWith(".png");
        System.out.println(end);        //false

    }
}
